import http from '@/util/http'
import qs from 'qs'

export function columnArticleSortUp (id) {
  return http.put(`/columnArticle/sortUp?columnArticleId=${id}`)
}

export function columnArticleSortDown (id) {
  return http.put(`/columnArticle/sortDown?columnArticleId=${id}`)
}

export function columnArticleGet (columnId) {
  return http.get(`/columnArticle/get?columnId=${columnId}`)
}

export function columnArticles (columnId, columnArticles) {
  return http.post('/columnArticle/columnArticles', qs.stringify({ columnId: columnId, articleIds: columnArticles }, { arrayFormat: 'repeat' }))
}
